package boogui.db;

public class MovieSQL {

	// 제목 검색
	private String titleSQL = "select distinct title"
			+ " from movies m inner join showing s"
			+ " on m.movno = s.movno where m.isplay ='Y' order by title";
	// 지역 검색
	private String locationSQL = "select distinct location"
			+ " from showing s inner join movies m"
			+ " on s.movno = m.movno inner join cinema c"
			+ " on c.cineno = s.cineno where title = ?";
	// 영화관 검색
	private String cinemaSQL = "select distinct cinename, theater"
			+ " from showing s inner join movies m"
			+ " on s.movno = m.movno inner join cinema c"
			+ " on c.cineno = s.cineno" + " where title = ? and location = ?";
	// 날짜 검색
	private String dateSQL = "select distinct sdate from "
			+ "showing s inner join movies m on s.movno = m.movno "
			+ "inner join cinema c on s.cineno = c.cineno "
			+ "where title = ? and location = ? and cinename = ? and theater = ?";
	// 시간 검색
	private String timeSQL = "select distinct stime from "
			+ "showing s inner join movies m on s.movno = m.movno "
			+ "inner join cinema c on s.cineno = c.cineno "
			+ "where title = ? and location = ? and cinename = ? and theater = ? and sdate = to_date(?,'YYYYMMDD') order by stime";
	// 회원 정보 조회 (전체)
	private String selectMovieSQL = "select * from movies where title=?";
	
	// 이미지 가져오기
	private String selectPosterSQL = "select poster from movies where title=?";
	

	public String getTimeSQL() {
		return timeSQL;
	}

	public void setTimeSQL(String timeSQL) {
		this.timeSQL = timeSQL;
	}

	public String getSelectPosterSQL() {
		return selectPosterSQL;
	}

	public void setSelectPosterSQL(String selectPosterSQL) {
		this.selectPosterSQL = selectPosterSQL;
	}

	public String getDateSQL() {
		return dateSQL;
	}

	public void setDateSQL(String dateSQL) {
		this.dateSQL = dateSQL;
	}

	public String getSelectMovieSQL() {
		return selectMovieSQL;
	}

	public void setSelectMovieSQL(String selectMovieSQL) {
		this.selectMovieSQL = selectMovieSQL;
	}

	public String getTitleSQL() {
		return titleSQL;
	}

	public void setTitleSQL(String titleSQL) {
		this.titleSQL = titleSQL;
	}

	public String getLocationSQL() {
		return locationSQL;
	}

	public void setLocationSQL(String locationSQL) {
		this.locationSQL = locationSQL;
	}

	public String getCinemaSQL() {
		return cinemaSQL;
	}

	public void setCinemaSQL(String cinemaSQL) {
		this.cinemaSQL = cinemaSQL;
	}
}
